<ion-view title="嘱托列表" hide-nav-bar="true">
    <ion-content>
        <ion-scroll direction="y" on-scroll="scrollFun()" delegate-handle="entrustScroll" style="width: 100%;height: 100%;">
            <div class="container">
                <div class="content">
                    <div id="audioBox"></div>
                    <div class="card" ng-repeat="item in vm.exhortaions track by $index">
                        <div class="item">
                            <div class="row">
                                <div class="col col-90">
                                    <div ng-if="item.entrustType == 'audio'">
                                        <!--<p class="entrust-type-p">[音频消息]</p>-->
                                        <div class="entrust-content-div" id="{{item.id}}">
                                            <div class="data-content audio-content">
                                                <button ng-click="playAudio(item.entrustAudioPath,item.id)" class="ion ion-play entrust-button-play"></button>
                                            </div>
                                            <div class="loading-icon">
                                                <div class="spinner" role="spinner"><div class="spinner-icon"></div></div>
                                            </div>
                                            <div class="audio-nprogress" style="width: 0%;"></div>
                                        </div>
                                    </div>
                                    <div ng-if="item.entrustType == 'text'">
                                        <!--<p class="entrust-type-p">[文本消息]</p>-->
                                        <div class="entrust-content-div">
                                            <div class="data-content">{{item.entrustContent}}</div>
                                        </div>
                                    </div>
                                    <br />
                                    <p class="dark">嘱托对象:{{item.toEntrustChildName}}&nbsp;宝宝</p>
                                    <p class="dark">嘱托于{{item.entrustTime | date:'yyyy-MM-dd HH:mm'}}</p>
                                </div>
                                <div class="col" ng-click="gotoDetail('{{item.id}}')">
                                    <i class="ion-chevron-right assertive entrust-info-i"></i>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="load-more-btn" style="text-align: center;" ng-show="vm.loadMoreBtnStatus == false">
                        <p>下面没有更多的嘱托了</p>
                    </div>
                    <ion-infinite-scroll on-infinite="loadMoreEntrust()" distance="0%" ng-show="vm.loadMoreBtnStatus"></ion-infinite-scroll>
                </div>
            </div>
        </ion-scroll>

        <!--悬浮菜单 start-->
        <div id="hamburgerMenuMask"></div>
        <div id="hamburgerMenuBtn">
            <div class="menu-btn-icon">
                <span class="line"></span>
                <span class="line"></span>
                <span class="line"></span>
            </div>
            <div class="menu-list">
                <!--<span class="menu-list-span">-->
                    <!--<a  href="javascript:;"><i class="icon ion-search menu-icon"></i></a>-->
                <!--</span>-->
                <span class="menu-list-span" ui-sref="entrust.create">
                    <a href="javascript:;"><i class="icon ion-compose menu-icon"></i></a>
                </span>
            </div>
        </div>
        <!--悬浮菜单 end-->
    </ion-content>
</ion-view>